#!/usr/bin/python
# -*- coding: utf-8 -*-

""" 測試函數 """


def f(a1, a2, a3, b1=11, b2="B-2", b3=None):
	print "a1=%r, a2=%r, a3=%r, b1=%r, b2=%r, b3=%r" % (a1, a2, a3, b1, b2, b3,)
# ### def f


def g(x, y):
	return (x, y, x+y,)
# ### def g



# 各種傳參數方法的組合
f(1, 2, 3, 4, 5, 6)
f(1, 2, 3, b2=6)
f(1, 2, 3, b3=5, b2=6)


# 傳回 tuple 等複雜的結構也是可能的
v_1, v_2, v_3, = g(1, 2)
print "g(1, 2): v_1=%r, v_2=%r, v_3=%r" % (v_1, v_2, v_3,)



# vim: ts=4 sw=4 foldmethod=marker ai nowrap
